package com.neusoft.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neusoft.mapper.UserMapper;
import com.neusoft.po.User;
import com.neusoft.service.UserService;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserMapper userMapper;

	@Override
	public User getUserByIdByPass(User user) {
		return userMapper.getUserByIdByPass(user);
	}

	@Override
	public int getUserById(String userId) {
		return userMapper.getUserById(userId);
	}

	@Override
	public int saveUser(User user) {
		return userMapper.saveUser(user);
	}
	@Override
	public int updateTotalPoints(String userId, Integer totalPoints) {
		return userMapper.updateTotalPoints(userId, totalPoints);
	}

	@Override
	public int getTotalPoints(String userId) {
		return userMapper.getTotalPoints(userId);
	}

	@Override
	public int subTotalPoints(String userId, Integer totalPoints) {
		return userMapper.subTotalPoints(userId, totalPoints);
	}
}
